<?php
/**
 * 粉丝接口
 * 获取粉丝列表
 * 验证用户身份token
 * @author Edwin
 */

namespace V1\Controller;

;
use Common\Controller\ApiController;
class FansController extends ApiController
{
    public function rest()
    {
        switch ($this->_method) {
            case 'get': // post请求处理代码
                $this->_get();
                break;
        }
    }

    /**
     * 查询粉丝api
     */
    public function _get()
    {
        $userid = $this->userId;
        $type = I('get.type');
        $request = D('MemberFans')->get_fans_list($userid,$type);
        if(!$request){
            $this->myApiPrint(C('STATUS')['230'], 201,[]);
        }else{
            $this->myApiPrint(C('STATUS')['200'], 200,$request);
        }
    }
}
